
    // 定时器函数中
    setInterval(function() {
        var imgObj=document.createElement("img");
        imgObj.src='./star.gif'
        var min = 20
        var max = 100
        imgObj.width = Math.floor(Math.random()*(max-min+1)+min)
        imgObj.style.position="absolute"
        // 随机定位范围
        var min = 0
        var max = (window.innerWidth || document.documentElement.clientWidth)-imgObj.width
        imgObj.style.left = Math.floor(Math.random()*(max-min+1)+min)+'px'
        var max = (window.innerHeight || document.documentElement.clientHeight)-imgObj.width
        imgObj.style.top=Math.floor(Math.random()*(max-min+1)+min)+'px'
        // 追加到页面
        document.body.appendChild(imgObj)
    },1000)
    
    // 删除
    // 获取body标签
    var bodyObj = document.querySelector('body')
    // 绑定点击事件
    bodyObj.onclick = function(e){
        var e = e || window.event
        // 获取操作标签
        var target = e.target || e.srcElement
        if (target.nodeName == 'IMG'){
            bodyObj.removeChild(target)
        }
    }
